var qdms_PopupHeight = null; var qdms_PopupWidth = null; let instanceName = localStorage.getItem('qdmsInstanceName'); let defaultColor = '#751748'; let defaultImage = '../app_themes/NewDesing/Themes/Theme1.png'; function updateLocalStorage(key, value, override) { if (!localStorage.getItem(key) || override) localStorage.setItem(key, value); } $(document).ready(function () { var $div = $('
').prependTo('body'); $div.attr('class', 'low-opacity-bg-image'); const root = document.querySelector(':root'); if (localStorage.getItem(instanceName + '_qdmsUserBackgroundColor')) { defaultColor = localStorage.getItem(instanceName + '_qdmsUserBackgroundColor'); } if (localStorage.getItem(instanceName + '_qdmsUserBackgroundImage')) { defaultImage = localStorage.getItem(instanceName + '_qdmsUserBackgroundImage'); } root.style.setProperty('--theme-color', defaultColor); root.style.setProperty('--theme-image', defaultImage); GetQdmsTables(); SetButtonHover(); if (typeof (Sys) !== "undefined") { var instance = Sys.WebForms.PageRequestManager.getInstance(); if (instance._postBackSettings == null) instance._postBackSettings = { "async": false } } }); $(window).resize(function () { GetQdmsTables(); }); if (!String.prototype.includes) { String.prototype.includes = function (search, start) { 'use strict'; if (search instanceof RegExp) { throw TypeError('first argument must not be a RegExp'); } if (start === undefined) { start = 0; } return this.indexOf(search, start) !== -1; }; } if (!Array.prototype.includes) { Object.defineProperty(Array.prototype, 'includes', { value: function (searchElement, fromIndex) { if (this == null) { throw new TypeError('"this" is null or not defined'); } // 1. Let O be ? ToObject(this value). var o = Object(this); // 2. Let len be ? ToLength(? Get(O, "length")). var len = o.length >>> 0; // 3. If len is 0, return false. if (len === 0) { return false; } // 4. Let n be ? ToInteger(fromIndex). // (If fromIndex is undefined, this step produces the value 0.) var n = fromIndex | 0; // 5. If n ≥ 0, then // a. Let k be n. // 6. Else n < 0, // a. Let k be len + n. // b. If k < 0, let k be 0. var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); function sameValueZero(x, y) { return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y)); } // 7. Repeat, while k < len while (k < len) { // a. Let elementK be the result of ? Get(O, ! ToString(k)). // b. If SameValueZero(searchElement, elementK) is true, return true. if (sameValueZero(o[k], searchElement)) { return true; } // c. Increase k by 1. k++; } // 8. Return false return false; } }); } if (!String.prototype.startsWith) { String.prototype.startsWith = function (search, pos) { return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; }; } function DeleteControlFromGrid(grd, mesaj) { if (grd.GetRowKey(grd.GetFocusedRowIndex()) == null) return false; return window.confirm(mesaj); } function DeleteControl(mesaj) { return window.confirm(mesaj); } function Control(mesaj) { return window.confirm(mesaj); } function AramaKriterleriniGizleAc() { if (document.getElementById('tblKriterler').style.visibility == 'hidden') { document.getElementById('tblKriterler').style.visibility = 'visible'; document.getElementById('tblKriterler').style.position = 'relative'; } else { document.getElementById('tblKriterler').style.visibility = 'hidden'; document.getElementById('tblKriterler').style.position = 'absolute'; } return false; } function getKeyEvent(e) { var keynum; var keychar; var numcheck; if (window.event) // IE keynum = e.keyCode else if (e.which) // Netscape/Firefox/Opera keynum = e.which; return keynum; } //txt.Attributes.Add("onkeypress", "return validateNUM(event,this);"); function validateNUM(e, field) { var key = getKeyEvent(e); if ((key == 8) || (key == null)) return true; key = String.fromCharCode(key); var regex = /[0-9]/; if (!regex.test(key)) return false; } function SetAttachmentTabText(tabName, gridID) { if (gridID != null && tabName != null) { var rowCount = gridID.pageRowCount; var tabText = tabName.GetText(); if (tabText.indexOf('(') > -1) tabText = tabText.substring(0, tabText.lastIndexOf("(")); if (rowCount >= 0) tabName.SetText(tabText + "(" + rowCount + ")"); } } function GetBottomMargin(BottomMargin) { if (BottomMargin == 0) BottomMargin = 58; if (BottomMargin == -1) BottomMargin = 68; var sTheme = getCookie('QDMS_THEME'); if (sTheme == 'Aqua') BottomMargin -= 0; if (sTheme == 'Glass') BottomMargin -= 5; if (sTheme == 'BlackGlass') BottomMargin += 2; if (sTheme == 'Office2003 Blue') BottomMargin += 7; if (sTheme == 'Office2003 Olive') BottomMargin += 7; if (sTheme == 'Office2003 Silver') BottomMargin += 7; if (sTheme == 'Plastic Blue') BottomMargin -= 7; if (sTheme == 'Red Wine') BottomMargin -= 4; if (sTheme == 'Soft Orange') BottomMargin += 1; if (sTheme == 'Youthful') BottomMargin += 1; if (sTheme == 'Light') BottomMargin += 15; if (navigator.appName != 'Microsoft Internet Explorer') BottomMargin -= 2; return BottomMargin; } function setRounPanelHeight(RoundPanelID, BottomMargin) { var BottomMargin = GetBottomMargin(BottomMargin); var clientHeight = parseInt(document.documentElement.clientHeight); if (clientHeight != 0) { clientHeight -= parseInt(BottomMargin) + 15; document.getElementById(RoundPanelID).height = parseInt(document.documentElement.clientHeight) - 5 + "px"; } return clientHeight; } function setRounPanelHeight2(RoundPanelID, BottomMargin, BoyutFarki) { var BottomMargin = GetBottomMargin(BottomMargin); var clientHeight = parseInt(document.documentElement.clientHeight); if (clientHeight != 0) { clientHeight -= parseInt(BottomMargin) + parseInt(BoyutFarki) + 10; document.getElementById(RoundPanelID).height = parseInt(document.documentElement.clientHeight) - parseInt(BoyutFarki) + "px"; } return clientHeight; } function SetDivWidth(DivID, Width) { if (IsNumeric(Width)) { var nWidth = parseInt(Width, 10) - 2; if (nWidth > 0) { var div = document.getElementById(DivID); if (div != null) { $("#" + DivID).width(nWidth) } } } } function setRoundPanelWidth(RoundPanelID, RightMargin) { var clientWidth = parseInt(document.documentElement.clientWidth); if (clientWidth != 0) { clientWidth -= parseInt(RightMargin) + 0; document.getElementById(RoundPanelID).Width = parseInt(document.documentElement.clientWidth) - 5 + "px"; } return clientWidth; } function trim(stringToTrim) { return stringToTrim.replace(/^\s+|\s+$/g, ""); } function IsNumeric(sText) { var ValidChars = "0123456789."; for (var i = 0; i < sText.length; i++) { if (ValidChars.indexOf(sText.charAt(i)) == -1) { return false; } } return true; } function SetDivHeight(DivID, Height) { if (IsNumeric(Height)) { var nHeight = parseInt(Height, 10) - 30; if (nHeight > 0) { var div = document.getElementById(DivID); if (div != null) { div.style.height = nHeight.toString() + "px"; } } } } function queryString(Deger) { var URL = location.href; var regEx = null; var exec = null; var Sonuc = null; if (Deger != null) { regEx = new RegExp("(\\?|&)(" + Deger + "=)(.*?)(&|$|#)", "i") exec = regEx.exec(URL) Sonuc = RegExp.$3 } else { regEx = new RegExp("(\\?)(.*?)($)", "i") exec = regEx.exec(URL) Sonuc = RegExp.$2 } return (Sonuc) } function setCookie(name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); } else var expires = ""; var oCookie = name + "=" + value + expires + "; path=/; HttpOnly;"; if (location.protocol === 'https:') oCookie += " Secure;"; document.cookie = oCookie; } function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } function eraseCookie(name) { setCookie(name, "", -1); } function RedirectSelf() { alert("d"); } function RedirectParent(RedirectPage) { parent.location = RedirectPage; } //Silmeyin gereklidir. function Dumb() { } function ShowMessage(MessageText, DistributionList, RedirectPage, RedirectType, Widht, Height, wrapMessageWithHTML = '', wrapDistributionListWithHTML = '') { if (MessageText.includes(localStorage.getItem(instanceName + "_qdmsProjectName")) && MessageText.includes("")) { Message = MessageText; } else { MessageText = qHtmlEncode(MessageText); DistributionList = qHtmlEncode(DistributionList); if (wrapMessageWithHTML) { MessageText = wrapMessageWithHTML.replace('{message}', MessageText) } if (wrapDistributionListWithHTML) { DistributionList = wrapDistributionListWithHTML.replace('{distributionlist}', DistributionList) } Message = ""; Message += ""; Message += " "; Message += ` ${localStorage.getItem(instanceName + "_qdmsProjectName")}`; Message += ""; Message += ""; Message += "
"; Message += "
"; Message += "
"; Message += " "; Message += " "; Message += " "; Message += " "; Message += "
" + MessageText + "
 
" + DistributionList + "
"; Message += "
"; Message += "
"; Message += "
"; Message += ""; Message += ""; } MessagePopup.SetSize(Widht, Height); if (RedirectType == 0) //Self MessagePopup.Closing.AddHandler(function (s, e) { document.location = "" + RedirectPage + ""; }); if (RedirectType == 1) //Parent MessagePopup.Closing.AddHandler(function (s, e) { parent.location = "" + RedirectPage + ""; }); MessagePopup.SetContentHtml(Message); MessagePopup.Show(); GetQdmsTablesMessagePopup('tableContainer_popup', MessagePopup); } function qHtmlEncode(str) { var encodedStr = document.createElement('div'); encodedStr.appendChild(document.createTextNode(str.replace(//g, "\r\n").replace(/
/g, "\r\n").replace(/€zxc€/g, "&#").replace(/'/g, "'").replace(/"/g, "\\").replace(/,/g, ","))); return encodedStr.innerHTML.replace(/(?:\r\n|\r|\n)/g, '
'); } function qHtmlDecode(encodedStr) { var tempElement = document.createElement('div'); tempElement.innerHTML = encodedStr; var decodedStr = tempElement.textContent || tempElement.innerText || ""; return decodedStr; } function Hashtable() { this.length = 0; this.items = new Array(); for (var i = 0; i < arguments.length; i += 2) { if (typeof (arguments[i + 1]) != 'undefined') { this.items[arguments[i]] = arguments[i + 1]; this.length++; } } this.removeItem = function (in_key) { var tmp_previous; if (typeof (this.items[in_key]) != 'undefined') { this.length--; var tmp_previous = this.items[in_key]; delete this.items[in_key]; } return tmp_previous; } this.getItem = function (in_key) { return this.items[in_key]; } this.setItem = function (in_key, in_value) { var tmp_previous; if (typeof (in_value) != 'undefined') { if (typeof (this.items[in_key]) == 'undefined') { this.length++; } else { tmp_previous = this.items[in_key]; } this.items[in_key] = in_value; } return tmp_previous; } this.hasItem = function (in_key) { return typeof (this.items[in_key]) != 'undefined'; } this.clear = function () { for (var i in this.items) { delete this.items[i]; } this.length = 0; } } function SetMemoMaxLength(memo, maxLength) { if (!memo) return; if (typeof (maxLength) != "undefined" && maxLength >= 0) { memo.maxLength = maxLength; memo.maxLengthTimerToken = window.setInterval(function () { var text = memo.GetText(); if (text && text.replace(/\n/g, "\r\n").length > memo.maxLength) memo.SetText(text.substr(0, memo.maxLength - (text.replace(/\n/g, "\r\n").length - text.length))); }, 10); } else if (memo.maxLengthTimerToken) { window.clearInterval(memo.maxLengthTimerToken); delete memo.maxLengthTimerToken; delete memo.maxLength; } } function ShowLoadingPanel() { jloadingPanel.Show(); } function HideLoadingPanel() { jloadingPanel.Hide(); } function DownloadReport(url) { var link = document.createElement('a'); link.href = url; document.body.appendChild(link); link.click(); link.parentElement.removeChild(link); } function callBackEvalFunction(callbackResult) { var aResult = callbackResult.split("|"); for (var i = 0; i < aResult.length; i++) { if (aResult[i].startsWith("EVAL_FUNCTION")) { var evalFunc = aResult[i].substr(aResult[i].indexOf("=") + 1) eval(evalFunc); } } } function DecodeTR(input) { return $('
' + input.replace(/').text(); }

function RemoveFolderInvalidChars(ctrl) {
    var tbox = document.getElementById(ctrl.id + "_I");
    if (!tbox.readOnly) {
        tbox.value = tbox.value.replace(/[/\\?&'*:|#´"<>]/g, '');
        tbox.value = tbox.value.replace(' ', '');
    }
    //tbox.value = tbox.value.replace(/[/\\?%æ½é£!${}&+'^*:|"<>]/g, '');
}
function RemoveInvalidCharsFromCode(ctrl) {
    var tbox = document.getElementById(ctrl.id + "_I");
    if (!tbox.readOnly) {
        tbox.value = tbox.value.replace(/[/\\?%æÆ½é£€₺!${};&¨#+´`'^*:|"<>=]/g, '');
        tbox.value = tbox.value.replace(' ', '');
    }
}

function RemoveInvalidCharsFromText(ctrl) {
    var tbox = document.getElementById(ctrl.id + "_I");
    if (!tbox.readOnly) {
        tbox.value = tbox.value.replace(/[/\\?%æ½é£!${}&#+'^*:|"<>]/g, '');
    }
}

function RemoveInvalidChars(ctrl) {
    var tbox = document.getElementById(ctrl.id + "_I");
    if (!tbox.readOnly) {
        tbox.value = tbox.value.replace(/[/\\?&'*:|´"<>]/g, '');
        tbox.value = tbox.value.replace(' ', '');
    }
}

function RemoveNonNumeric(ctrl) {
    var tbox = document.getElementById(ctrl.id + "_I");
    tbox.value = tbox.value.replace(/\D/g, '');
}

function CallbackPanelError(s, e) {
    e.handled = true;
    var message = e.message.replace(/</g, '<').replace(/>/g, '>');
    ShowMessage(message, "", "", 2, 800, 400);
}

function TodayAddDays(day) {
    var today = new Date();
    today.setHours(0, 0, 0, 0);
    today.setDate(today.getDate() + parseInt(day));
    return today;
}

function SetInformationImageVisibilty(img) {
    if (img.parentElement.clientWidth - img.parentElement.scrollWidth == 0)
        img.style.display = 'none';

}

function grdIsRowSellected(grd, mesaj) {
    if (grd.GetRowKey(grd.GetFocusedRowIndex()) == null) {
        ShowMessage(mesaj, "", "", 2, 400, 300);
        return false;
    }
    return true;
}
function grdIsMultiRowSellected(grd, mesaj) {
    if (grd.GetSelectedRowCount() == 0) {
        ShowMessage(mesaj, "", "", 2, 400, 300);
        return false;
    }
    return true;
}

function OpenGlobalPopup(popUp, url) {
    popUp.contentUrl = url;
    if (navigator.appName != 'Microsoft Internet Explorer') { popUp.RefreshContentUrl(); }
    popUp.SetSize(document.documentElement.clientWidth - 5, document.documentElement.clientHeight - 5);
    popUp.Show();
}

function htmlDecode(input) {
    var doc = new DOMParser().parseFromString(input, "text/html");
    return doc.documentElement.textContent;
}

function addFavToList(favTitle, url, id) {
    var favoriteMenu = $("#favMenuUl");
    var sLi = $("
  • ").attr("id", "favLi-" + id); var aHref = $("").attr("href", url).attr('target', 'frMain'); var dLi = $("
    ").addClass("d-flex align-items-center").html("" + qHtmlEncode(favTitle) + ""); dLi.appendTo(aHref); aHref.appendTo(sLi); sLi.appendTo(favoriteMenu); } function ChangeStaticItemSvgColor(svgObject) { if (svgObject && svgObject.contentDocument) { let svgDocument = svgObject.contentDocument; let allElements = svgDocument.querySelectorAll("*"); let fillElements = []; let strokeElements = []; for (let item of allElements) { let fill = item.style["fill"] let stroke = item.style["stroke"] if (fill == 'rgb(117, 23, 72)') { fillElements.push(item); } if (stroke == 'rgb(117, 23, 72)') { strokeElements.push(item); } } fillElements.forEach(function (element) { element.style.fill = defaultColor; }); strokeElements.forEach(function (element) { element.style.stroke = defaultColor; }); } } function handleSvgLoad(svgObject) { const svgDocument = svgObject[0].contentDocument; if (svgDocument) { ChangeStaticItemSvgColor(svgObject[0]); } } function SetHiddenValue(hdnId, inputId) { var hdn = document.getElementById(hdnId); var input = document.getElementById(inputId); if (hdn && input) { hdn.value = input.value; } } function SetGridHeight(s, e) { const element = jQuery("#" + s.name); const parentList = element.parents().filter(function () { return this.id.includes("gridContainer"); }); if (parentList.length > 0) { const parentElement = parentList[0]; /* const tabsHeight = GetTabPageHeight(element);*/ const clientInstanceName = element.attr("clientinstancename"); const headerAndFooterHeight = FindHeaderAndFooterElements($(this)); setTimeout(function () { SetQdmsContentDivHeight(parentElement.id, clientInstanceName, headerAndFooterHeight); }, 150); } } function SetTreeHeight(s, e) { const element = jQuery("#" + s.name); const parentList = element.parents().filter(function () { return this.id.includes("treeContainer"); }); if (parentList.length > 0) { const parentElement = parentList[0]; //const tabsHeight = GetTabPageHeight(element); const clientInstanceName = element.attr("clientinstancename"); const headerAndFooterHeight = FindHeaderAndFooterElements($(this)); setTimeout(function () { SetQdmsContentDivHeight(parentElement.id, clientInstanceName, headerAndFooterHeight); }, 150); } } function SetQdmsContentDivHeight(contentId, gridId, extractedHeight) { if ($('#' + contentId)) { let extraElementHeigth = 0; var previousElement = document.getElementById(contentId).previousElementSibling; if (previousElement) { var previousElementStyle = window.getComputedStyle(document.getElementById(contentId).previousElementSibling); var displayValue = previousElementStyle.getPropertyValue('display'); } if (document.getElementById(contentId).id.includes("-extra-") && (!previousElement || (previousElement && displayValue !== 'none'))) { extraElementHeigth = document.getElementById(contentId).id.split('-extra-')[1]; } const paddingHeight = extractedHeight != 0 ? 16 : 0; $('#' + contentId).css('height', (GetPageHeight() - (extractedHeight + (isNaN(parseInt(extraElementHeigth)) ? 0 : parseInt(extraElementHeigth)))) - paddingHeight); GrdOrTreeAdjustSize(contentId, gridId); } } function GrdOrTreeAdjustSize(selector, gridId, extraElementHeigth) { let height = Math.max(0, document.getElementById(selector).style.height.replace('px', '')); eval(gridId).SetHeight(height - (isNaN(parseInt(extraElementHeigth)) ? 0 : parseInt(extraElementHeigth))); eval(gridId).AdjustControl(); } function GetQdmsTables() { let allTableContainer = $(".qdmsfixedtable"); allTableContainer.each(function (s, e) { const headerAndFooterHeight = FindHeaderAndFooterElements($(this)); if ($(this).parent().is("div") && $(this).parent()) { if (e.parentElement.id.toString().includes("tableContainer")) { //const tabsHeight = GetTabPageHeight($(this)); SetQdmsTableContentHeight(e.parentElement.id, headerAndFooterHeight); } } }); } function GetQdmsTablesMessagePopup(contentId, mPopup) { if ($('#' + contentId)) { let wHeight = eval(mPopup).height; $('#' + contentId).css('height', (wHeight - jQuery("#MessagePopup_PWH-1").outerHeight()) - 16); } } function SetQdmsTableContentHeight(contentId, extractedHeight) { if ($('#' + contentId)) { let wHeight = GetPageHeight(); const paddingHeight = extractedHeight != 0 ? 16 : 0; let extraElementHeigth = 0; if (document.getElementById(contentId).id.includes("-extra-")) { extraElementHeigth = document.getElementById(contentId).id.split('-extra-')[1]; } $('#' + contentId).css('height', ((wHeight - extractedHeight) - paddingHeight) - (isNaN(parseInt(extraElementHeigth)) ? 0 : parseInt(extraElementHeigth))); } } function GetPageHeight() { return window.innerHeight ? window.innerHeight : document.body.clientHeight; } function FindHeaderAndFooterElements() { let allHeaders = document.querySelectorAll(".qdmsfixedheader"); let totalHeight = 0; if (allHeaders.length > 0) { for (const header of allHeaders) { if (header.clientHeight > 0) { totalHeight += header.clientHeight; } } } let allFooters = document.querySelectorAll(".qdmsfixedfooter"); if (allFooters.length > 0) { for (const footer of allFooters) { if (footer.clientHeight > 0) { totalHeight += footer.clientHeight; } } } return totalHeight; } function GetTabPageHeight(element) { let tabsHeight = 0; let tabPageParent = element.parents(".dxtcLite.dxtcSys.dxtc-flex.dxtc-top.dxtc-pc"); if (tabPageParent.length > 0) { const children = Array.from(tabPageParent[0].children); for (const childNode of children) { if (childNode.nodeType === 1 && childNode.classList.contains("dxtc-strip") && childNode.classList.contains("dxtc-row") && childNode.classList.contains("dxtc-alLeft") && childNode.classList.contains("dxtc-stripContainer")) { tabsHeight += childNode.clientHeight + 5; } } } return tabsHeight; } function OpenTab(tab, ActiveTabList, url) { var tabName = tab.name; var iframeId = "fr" + tabName.charAt(0).toUpperCase() + tabName.slice(1); if (Contain(ActiveTabList, tabName) == -1) { var iframe = document.getElementById(iframeId); if (iframe) { if (url) { iframe.src = url; } else { iframe.src = iframe.src; } ActiveTabList.push(tabName); } } } function Contain(ArrayObject, needle) { return ArrayObject.indexOf(needle) > -1 ? 1 : -1; } function SetButtonHover() { let allButtons = $(".svgbutton"); allButtons.each(function (s, e) { let div = $("
    ", { class: "hoverbutton d-flex align-self-center", id: `hoverdiv_` + $(this)[0].id, }); if (!$(this).parent().hasClass("hoverbutton") && $(this).css("display") != 'none') { div.append($(this).clone()); let span = $(this).next(); if (span.hasClass("buttonspn")) { div.append($(this).next().clone()); if (span.next().hasClass("dropsvgbutton")) { div.append(span.next().clone()); span.next().remove(); } $(this).next().remove(); } $(this).before(div); if (!$(this).hasClass("noclick")) { let onClickFunc = document.getElementById($(this)[0].id).getAttribute("onclick"); if (onClickFunc) onClickFunc = "event.stopPropagation(); " + onClickFunc; else onClickFunc = "event.stopPropagation();"; document.getElementById($(this)[0].id).setAttribute("onclick", onClickFunc); document.getElementById(div[0].id).setAttribute("onclick", `document.getElementById('${$(this)[0].id}').click()`); } $(this).remove(); } }); let allDropButtons = $(".dropsvgbutton"); allDropButtons.each(function (s, e) { let parentDiv = $(this).parent(); if (parentDiv.hasClass("d-flex") && parentDiv.hasClass("p-2") && parentDiv.hasClass("dropdownbbottom") && !parentDiv.attr("onclick")) { let onClickFunc = document.getElementById($(this)[0].id).getAttribute("onclick"); if (onClickFunc) onClickFunc = "event.stopPropagation(); " + onClickFunc; else onClickFunc = "event.stopPropagation();"; document.getElementById($(this)[0].id).setAttribute("onclick", onClickFunc); document.getElementById(parentDiv[0].id).setAttribute("onclick", `document.getElementById('${$(this)[0].id}').click()`); } }); } function getQueryStringParameter(name) { let urlParams = new URLSearchParams(window.location.search); return urlParams.get(name); } function showPopup(url, popupControl) { popupControl.contentUrl = url; let qsc_PopupHeight = document.documentElement.clientHeight - 50; let qsc_PopupWidth = document.documentElement.clientWidth - 50; popupControl.SetSize(qsc_PopupWidth, qsc_PopupHeight); if (navigator.appName != 'Microsoft Internet Explorer') { popupControl.RefreshContentUrl(); } popupControl.Show(); return false; } $(document).on('keydown', '.listenerEnter', function (event) { if (this.tagName.toLowerCase() === 'textarea') { if (event.which === 13 && event.ctrlKey) { event.preventDefault(); $(this).next().children().trigger('click'); } } else { if (event.which === 13) { $(this).next().children().trigger('click'); event.preventDefault(); } } }); $(document).on('input', '.char-count-input', function () { updateCharCount(this); }); function updateCharCount(input) { let $inputGroup = $(input).closest('.input-group'); let $countElem = $inputGroup.find('.char-count'); let maxLength = $(input).attr('maxlength'); let currentLength = $(input).val().length; $countElem.text(currentLength + ' / ' + maxLength); }